projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10412dd
)
icon-browser: Hide the description label when empty
author
Matthias Clasen
<mclasen@redhat.com>
Tue, 29 Jul 2014 12:57:28 +0000
(14:57 +0200)
committer
Matthias Clasen
<mclasen@redhat.com>
Tue, 29 Jul 2014 12:57:28 +0000
(14:57 +0200)
demos/icon-browser/iconbrowserwin.c
patch
|
blob
|
history
diff --git
a/demos/icon-browser/iconbrowserwin.c
b/demos/icon-browser/iconbrowserwin.c
index 47c621d44a275d97a8b925182f72c69e72d277f6..e9dfd30896ca69783329b7c0eda913a2411d85af 100644
(file)
--- a/
demos/icon-browser/iconbrowserwin.c
+++ b/
demos/icon-browser/iconbrowserwin.c
@@
-104,7
+104,15
@@
item_activated (GtkIconView *icon_view, GtkTreePath *path, IconBrowserWindow *wi
set_image (win->image3, name, 32);
set_image (win->image4, name, 48);
set_image (win->image5, name, 64);
- gtk_label_set_text (GTK_LABEL (win->description), description);
+ if (description && description[0])
+ {
+ gtk_label_set_text (GTK_LABEL (win->description), description);
+ gtk_widget_show (win->description);
+ }
+ else
+ {
+ gtk_widget_hide (win->description);
+ }
gtk_window_present (GTK_WINDOW (win->details));